<template>
    <div>
        <a-carousel arrows autoplay>
            <div
                    slot="prevArrow"
                    slot-scope="props"
                    class="custom-slick-arrow"
                    style="left: 10px;zIndex: 1"
            >
                <a-icon type="left-circle" />
            </div>
            <div slot="nextArrow" slot-scope="props" class="custom-slick-arrow" style="right: 10px">
                <a-icon type="right-circle" />
            </div>
            <div v-for="(item,index) in img" :key="index" style="height: 400px">
                <img :src="item.imgUrlPc" class="lunboimg">
            </div>
        </a-carousel>
    </div>
</template>

<script>
    import {getSwiper} from '../api/Tlmusic'

    export default {
        name: "Swiper",
        // props:{
        //     autoplay:true
        // }
        data(){
            return{
                autoplay:true,
                number:5,
                img:[]
            }
        },
        created() {
            getSwiper(this.number).then(res=>{
                this.img = res.data
            } )
        }
    }
</script>

<style scoped>
    /* For demo */
    .ant-carousel >>> .slick-slide {
        text-align: center;
        height: 400px;
        line-height: 400px;
        background: #364d79;
        overflow: hidden;
    }

    .ant-carousel >>> .custom-slick-arrow {
        width: 25px;
        height: 25px;
        font-size: 25px;
        color: #fff;
        background-color: rgba(31, 45, 61, 0.11);
        opacity: 0.3;
    }
    .ant-carousel >>> .custom-slick-arrow:before {
        display: none;
    }
    .ant-carousel >>> .custom-slick-arrow:hover {
        opacity: 0.5;
    }

    .ant-carousel >>> .slick-slide h3 {
        color: #fff;
    }

.lunboimg{
    height: 100%;
    width: 100%;
    }
</style>